import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

export default defineConfig({
  plugins: [vue(
    {
      css: {
        preprocessorOptions: {
            less: {
                modifyVars: {
                    hack: `true; @import (reference) "${path.resolve("@assets/css/base.less")}";`,
                },
                javascriptEnabled: true,
            },
        },
    },
    }
  )],
  resolve:{
    alias: {
      '@': path.resolve(__dirname,'src'),
      '@assets': path.resolve(__dirname,'src/assets'),
      '@views': path.resolve(__dirname,'src/views'),
      '@api': path.resolve(__dirname,'src/api'),
      '@components': path.resolve(__dirname,'src/components'),
      '@utils': path.resolve(__dirname,'src/utils'),
      '@router': path.resolve(__dirname,'src/router'),
      '@store': path.resolve(__dirname,'src/store'),
      '@utils': path.resolve(__dirname,'src/utils'),
      '@api': path.resolve(__dirname,'src/api'),
    }
  }
})
